Cap the vulnerabilities tooltip in the software details modal - #53038
ShreyashAgare26 wants to merge 1 commit into
Conversation
TruncatedTextList passed every hidden item to its tooltip, so a title with 57 CVEs opened a 936px tooltip that covered the modal and ran off the screen. A hover tooltip cannot scroll, so the rest was unreachable. Cap the tooltip at 10 items with a "+N more" count. The cap lives in the component so every caller is covered, not just the software details modal.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #53038 +/- ##
==========================================
+ Coverage 75.94% 75.97% +0.03%
==========================================
Files 4109 4114 +5
Lines 248789 248961 +172
Branches 14332 14406 +74
==========================================
+ Hits 188932 189140 +208
+ Misses 59681 59644 -37
- Partials 176 177 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The capped tooltip behavior is covered for large lists, and no actionable current-head risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related issue: Fixes #52810
On My device, open a software title with a lot of CVEs and hover the "+53 more" next to Vulnerabilities. The tooltip lists every hidden CVE in one column. With 57 CVEs it was 887px tall in a 950px window, so it covered the modal it came from, and on a shorter window the bottom was unreachable. Hover tooltips do not scroll.
The list comes from
TruncatedTextList, which hands every hidden item to the tooltip. I capped it at 10 with a "+N more" count for the rest. The cap lives in the component, not the call site, so host details, policy labels, and the software library accordion are covered too.The table cell next to it already caps at 3 (
NUM_VULNERABILITIES_IN_TOOLTIP). I used 10 because 3 is sized for an inline cell and would hide 54 of 57 CVEs in a modal. 10 keeps the tooltip near 200px. Say the word and I will match 3.Checklist for submitter
changes/.Testing
New test in
TruncatedTextList.tests.tsxrenders 57 items and checks the tooltip lists 10 and counts the other 46. It fails without the fix.Manual check in a local server: My device > Software > 1Password with 57 CVEs > hover "+52 more". Also in Storybook with a new
ManyItemsstory, where the tooltip measures 936px before and 194px after.AI
AI: Claude Code (claude-opus-5[1m])
Frontend
Before, 56 CVEs in one column at 936px, top and bottom off screen:
After, 10 CVEs and a "+46 more" count at 194px:
Summary by CodeRabbit
Bug Fixes
Tests